<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        ContextMenu <span class="subitem">Basic</span>
    </ui:define>

    <ui:define name="description">
        ContextMenu is an overlay menu display mainly displayed using right-click.
    </ui:define>

    <ui:param name="documentationLink" value="/components/contextmenu"/>
    <ui:param name="widgetLink" value="ContextMenu-1"/>

    <ui:define name="implementation">
        <div class="card">
            Right click to view the menu options.

            <h:form>
                <p:growl id="messages" showDetail="true"/>

                <p:contextMenu>
                    <p:menuitem value="Save" action="#{menuView.save}" update="messages" icon="pi pi-save"/>
                    <p:menuitem value="Update" action="#{menuView.update}" update="messages" icon="pi pi-refresh"/>
                    <p:menuitem value="Delete" action="#{menuView.delete}" ajax="false" icon="pi pi-times"/>
                    <p:menuitem value="Homepage" url="https://www.primefaces.org" icon="pi pi-home"/>
                </p:contextMenu>
            </h:form>
        </div>
    </ui:define>

</ui:composition>
